added logic for adding packages/classes. arraylists are now used to store top-level models only