Remove extension from function files
Use proper check for gui