Added compatibility with Interface Builder

Added a NIB constructor and a general init method