Simplify datastructures, add Map class