Refactored everything into the index template/function, completed basic CSS restyling