Restructure
Write spec and fix bugs
Write spec for median tree