Added complete feature. Fixed bugs