Cleaned up Theta step definition
Wrote new theta assignment function