add comments/clean up code
fix index.php

everything is working fine now! i hope...