Add function headers and clean up dir