some more refactoring
added kernel call for top boundary
added tests for remaining boundaries