Refine models and add initial tests