Added 2D sweep application with minor changes to lib