Added a dynamic array implementation.
Reformatted code.