Cleaned up code, removed un-used code.