Issue #113 - Code cleanup

- Removed unused imports
- Avoid possible NPE when using list.size()