Fixes

Cleaned bugs; added features.