Cleaned up the Pin controller