Finished base conversion functions, added test flags