Porting in progress. Files other than stardate.py will be removed later