Fixed front page even more, cleaned up code