style and functional fixes