starting to componentise code.
resolving merge conflicts