[WIP] Registration logic