A lot of changes to simplify this repository