Moved model construction to a separate package.
Removed unused classes.
Refined output and exception handling.