Moved code and classes a bit.
 fixed some Log.d typos.