Consistency updates

Seperate var, wrap object keys in quotes, add comments where necessary.