Just updated syntax and some refactoring