Cleaned up the Array Layer (added transactionals, simplified logic, param checks)