Implemented arguments parsing and session management