Moved files. Refactored main script.