Fix elements
Work on refactoring