cleaned up, and minor changes