Card creation updated code style and testing

Functions should all work properly.....