Reverted back to calculating array sizes at runtime, rather than compile-time.