Splitted menu code off into .js file. Fixed small bug.