Extract BitmapEditor class

All editor commands are extracted to
a separate class.
Refactor code

Instead of using case, dynamically choose
which command to execute.