added testing, changed models to a separately file.