Refactoring

Made things look a bit better and easier to read