adds debugging output, fixes crop dimensions + other small changes