#32: Revert authorizing status
#32: Restructured and improved the code