Added proper funding info, cleaned up the code