Cleanup and Script Addition

Cleaned up the main class and added a double redirect resolver.