Various changes on db schema for compatibility issues.
Added getOrCreate method and fixed some bugs.
Market module now uses sqlite.