Some refactoring...
More refactoring; Started work on custom layer renderers