Fixes and simplification