Basic entity (rectangle) handling

Warning: VERY HACKY IMPLEMENTATION