Fixes, updates and rewrites