Replaced hashmaps by self-made entities