added ability to change host from command line, updated model for postgres compatability