Functions moved to separate file
Executable flag added