Cleaned up and implimented pop