reorganized model, added docblocks