Initial work on removing pth.

Signed-off-by: Ondřej Hošek <ondra.hosek@gmail.com>