removed unused types; improved unit testing coverage