fixed async issue with loading data

thanks to http://stackoverflow.com/a/5641995 i've changed the behaviour of the init_pools() function to be synchronous
because things weren't being loaded and filled correctly.  oh the joy of writing an API and the AJAX ui at the same time.