Fixed bug in models module - tested initial APIs