UI refreshing issue fixed.
SQL query fix. Method names and description changed to be clearer.