Fixed problem with incorrect params in  the constructor. Also, fixed detecting of point situation(in square or not)