updated to support both NSUserDefaults and Sqlite3
replacing entire project with newer version