Added better #map support (still not finished)