Small reorganization & parameter checks