All working now, just apd generator to write...