optimized primary keys and shit and fixed stuff