I have seen something similar in another thread. You might find certain parts of that post helpful, not everything of course, but I still think it is worth checking out. 
http://www.enkirama.fr/?p=14015