Removed warning and added input flag parsing