Multiple small changes and cleanup