Javascript refactor and new services implemented