Initial commit - Backend logic and some layout tests