Wrapped in class & widget in seperate file

I've wrapped all the functions into a class. This should prevent
namespace collisions and in the future should make it easier to deal
with 'global' variables. The widget is now in a seperate file. I prefer
to give each class it's own file. All the hooks are now part of the
class constructor method instead of all over the place.

No functionality was changed and the plugin should still work as before.