WIP
Fixed issues and added backward compatibility