Changed Optimizer and OptSearcher (OOP)

Replaced the integers representing certain objects by the objects
themselves, improving readability.
Meta-changes (minor)