I've found a nice template and want to know how to make it into a glype theme and i know many people do it here for free but i want to learn how to do it myself.

so i tried just renaming index.php to main and that didn't work the layout went all funny. so is there any tutorials around or resources?