added interval tests, and cleanup