Updated session close method,
Adjusted several class names for better readability,
Considered using enum to represent some of handler states,
Other minor structral changes.