solidfied the use of _state and baseUrl; some code cleanup
Merge branch 'master' into develop