Integration somewhat
minor bug fixes