Working Solution V.1

Wworking solution to my problem, I need to comment my code and
re-evaluate certain parts of it before it is fully complete, then needs
testing on other machines.