Cleaned up the size() method.

The size() method now uses keys(). Grouped some of the methods in
mapping.coffee out of vanity.