Removed no longer used code.
Updated code based on actual schema.