Fixed echoing array on debug
Added further validation
Removed "todo"