Feature/visibility hidden

a few changes that allow to turn on `-fvisibility=hidden` for gcc