Refactoring beginning at the beginning…main.
Merge pull request #1 from mkovacina/pso

Refactoring beginning at the beginning…main.