Small notes added and cleanup of code