Refactored auth code + data structures, added FEATURES