- Moved main under portable src dir
- Fixed unit tests
- Small refactoring to main
- Better debug messages