Release candidate, cleaned up code