added missing stuff from before(), after(), and __construct()