Added <functional>
Fixed #3 and #4
Added vector::reserve and resize