Removed dependency on stackexchange code. Added drawing mode