Added the method dispatcher and some other preliminary things.