Add define function, maintain backward compatibility
Accept Closures as attribute factory
Merge pull request #15 from dimrsilva/master

Remove test code from your source
Fix undefined variables when looking for id
Add support for Kohana primary key method
Merge pull request #20 from scottrobertson/fix-undefined-id

Fix undefined variables when looking for id
Merge pull request #21 from scottrobertson/fix-undefined-id and fixed conflicts