Improved input handling, type handling

Uses regex for input handling now.
changed ints to double where applicable.