Refactored Code

deleted entity interface, and replaced it with the token clas, added
same function declarations.