Follow-up on review

- Added more strict data checks
- Changed `$(ev.currentTarget)` into `$(this)`
- Expanded the unit tests with more test cases