Convert entities into mapped-superclass

Fix #250