cleaned up bapl_dense_sift code and fixed test.