Added cursor and friendly bounds checking to Square