Removed out-of-bounds checking; improved phpDoc