Changed arrays to ArrayList to avoid potential size issues. Easier
maintenance.