Code cleanup

see #162