Fixed minor bugs. Updated schema