Bug fixes and improvements. v1.0-beta.1