Cleaned up js code! Whoohoo!