Reorganize some stuff and remove if dev checks