Added skeleton for unit testing, other small changes