remove unused function, minor fixes