Improved structure of functional test. It now uses unittest module.