Fixed Javascript bugs
Fixed more javascript issues, front-end is working now