Clean-up

Types and formatting