Back to functional

Due requests, kept code using Functional programming. OOP will be availible in a branch.