More js functionality, tdd