Refactoring, remove old files

Fix #172, Fix #173