I thought of making it a library with some simple callbacks, so you would call it and it would call your callback parameter of your routine that would just call you back for every cube that it wants to search and you would tell it if it is passable and A* weight... this would be very simple to use.