Organised some code dealing with account settings and refactoring