Cleaned up contractor code