Cleaned up code, fixed bugs, updated pages