redesigned handles array

handles array now includes all elements separately
Improved documentation, error handling, formatting
Started testing