Minor syntactical changes
Added pixel counting and some debugging things