hard refactoring. especially with all calbacks.
added fd-handler bindings.