some little corrections and cleanup