Cleaned up select_pseudo_table and started to prepare for dynamic select parts
Added dynamic versions of from and where to select