Starting code for entities

This is just a start, I will continue with this file maybe tomorrow.