Minor fixing and cleanup