cleaned up js a little