few small changes and cleanup