Version 5

Fixed memory problems