Split the source for PhotoFile class
Prettify the code

Rearranged namespaces.
Moved repeating code into functions.
Ignore core files from submitting into Git