First commit with working code. Basic and incomplete.