Initial tile creation code

Not pretty but functional