refactored and commented javascript
added username to json response
tidied up homes to home