Implemented register fuction. Updated Register sp.