Table design changes

Added primary keys and few other design changes