Added max/min width/height restrictions to widget
Fixed potential problem in updateSizeAndPosition
Removed unnecessary code
Implemented Android visibility system