Updated to entirely functional!