Fixed bugs and added parameterized locations