Added dimension information for certain objects; some code refactoring