Fixed array retrieval binding problem and restored much code removed while debugging