Removed variable length arrays in order to compile with VS2010