fixed some typos and cleaned up some js