added pre and post init methods, updated examples and others