Modified the logic for displaying buttons per tasks.

Also made active-tab the last problem and fixed an import bug in Score model.