More bugfixes and enhancements

Version 0.04 (functional)