Changed to using separate arrays instead of structured arrays