Source file cleanups

Check for file existance is now an incline function
Improved code readability