Fix main page aligning and minor bugs