Added more advanced logic for register. (Alpha 1.2)