Centralized the ticket creation code plus a minor constant refactoring
Namespace-ed valid tickets and performed minor refactorings
Refactoring code to implement three different expiration policies