Cleaned up code and added nova policy