rewrote the square classes to be more suitable and changed other classes
depending on