changed to zero based indexing
added more preallocation
improved code readability
merge develop -> genetic algorithms