JS homework - Bug fixes and finished