Documentation and removing of fatty code