Got a fully working version.