Forgot sme stuff. And refactoring