#205 and #206 and cleanup