contracts sped up + cleaned up code + all specs pass