Clean-ups and documentation