Made code prettier by adding a locations class