Added P033, P035, P038 and P089, cleaned up code