Add compactWithAnimation && various bug fixes