[WIP] Added image filesize validation and some refactoring

'git'? :-)