Updates objects to use constructors

Those constructors also have helpful entity prototype functions,
including a `setLoc` function that handles movement, which uses
entitiesByLocation (fixes #5)