Almost finished. Functionality added. Warnings required