Finalized registration. Fixed some bugs
Fixed some small bugs