Fixed smells and covered tests