Adding inserts and fixing classes