Cleanup by @alrra + some conflict resolving