code cleanup and restructure

Signed-off-by: luka8088 <luka8088@owave.net>
added isIterable

Signed-off-by: luka8088 <luka8088@owave.net>