Fixed issues #11 & #12

- Fixed code warnings from JSLint and JSHint
- Only allow one and only one expanded item in SINGLE mode