Cleaned up layer code, added unstable split view