Added selection table functionalities.

Still not fully working.